What anyone who keeps a loaded automatic pistol nearby should do is to keep the gun unchambered and on safety. A child could easily take the safety off but will not be able to 'rack' the slide to chamber the weapon. That takes knowledge of firearms and some strength to do. Even then such a weapon, if it is not being kept in storage, should be in a man's pant pockets - unchambered not in a purse where she can be fumbling for the keys or something.
It takes discipline and responsibility to own a weapon. I believe that couple should be ordered by the court to take gun safety classes while the firearm is held by the courts until their completion of the classes.